package com.jiangyao.model.dto.backend;

import com.jiangyao.model.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 评价DTO
 *
 * @author: yangyongchuan
 * @create: 2020年09月05日 13:42
 */
@ApiModel("评价DTO")
@Data
public class EvaluationDTO implements BaseDTO {

	private static final long serialVersionUID = -1813490577390814501L;

	public interface reply {
	}

	/**
	 * 评价ID
	 */
	@ApiModelProperty(value = "评价ID（回复评论使用）")
	@NotNull(message = "评价ID不能为空", groups = {reply.class, Detail.class})
	private Integer id;

	/**
	 * 评价ID集合
	 */
	@ApiModelProperty(value = "评价ID集合（审核评论使用）")
	@NotNull(message = "评价ID不能为空", groups = {Edit.class})
	private List<Integer> idList;

	/**
	 * 评价内容
	 */
	@ApiModelProperty(value = "评价内容")
	@NotNull(message = "评价内容不能为空", groups = {reply.class})
	@NotEmpty(message = "评价内容不能为空", groups = {reply.class})
	private String content;

	/**
	 * 审核状态 0 待审核 1 审核通过 2 审核失败
	 */
	@ApiModelProperty(value = "审核状态 0 待审核 1 审核通过 2 审核失败", example = "1")
	@NotNull(message = "评价ID不能为空", groups = {Edit.class})
	private Integer status;

}
